package com.geqian.web;

import com.geqian.cache.cache.SimpleCacheTemplate;
import com.geqian.file.storage.FileStorageTemplate;
import org.mybatis.spring.annotation.MapperScan;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.context.ConfigurableApplicationContext;
import org.springframework.context.annotation.EnableAspectJAutoProxy;
import org.springframework.scheduling.annotation.EnableScheduling;

@MapperScan("com.geqian.web.mapper")
@SpringBootApplication
@EnableAspectJAutoProxy
@EnableScheduling
public class BlowballAdminApplication {

    public static void main(String[] args) {
        ConfigurableApplicationContext applicationContext = SpringApplication.run(BlowballAdminApplication.class, args);
        SimpleCacheTemplate<?, ?> simpleCacheTemplate = applicationContext.getBean(SimpleCacheTemplate.class);
        FileStorageTemplate fileStorageTemplate = applicationContext.getBean(FileStorageTemplate.class);
        System.out.println("当前缓存：" + simpleCacheTemplate.getClass().getSimpleName());
        System.out.println("当前文件存储：" + fileStorageTemplate.getClass().getSimpleName());
    }

}
